<template>
    <div>
        <p>这是计算属性的结果:{{num}}</p>
        <p>这是函数调用的结果:{{getNum()}}</p>
    </div>
</template>

<script>
export default {
    name: 'VuBaseApp',

    data() {
        return {
            a:10,
            b:20
        };
    },

    mounted() {
        
    },

    methods: {
        getNum(){
            return this.a+this.b
        }
    },
    computed:{
        num(){
            return this.a+this.b
        }
    }
};
</script>

<style lang="scss" scoped>

</style>